<link rel="stylesheet" href="__PUBLIC__/Home/style/home.css" type="text/css">
<link rel="stylesheet" href="__PUBLIC__/Home/style/order.css" type="text/css">
<script type="text/javascript" src="__PUBLIC__/Home/js/home.js"></script>
<include file="Common/nav"/>
<!-- 页面主体 start -->
<div class="main w1210 bc mt10">
    <div class="crumb w1210">
        <h2><strong>我的XX </strong><span>> 我的订单</span></h2>
    </div>
    <include file="My/menu"/>
    <!-- 右侧内容区域 start -->
    <div class="content fl ml10">
        <div class="order_hd">
            <h3>订单号:{$order.order_sn}</h3>
        </div>

        <div class="order_bd mt10">
            <table class="orders">
                <thead>
                <tr>
                    <th width="10%">商品名称</th>
                    <th width="20%">商品图片</th>
                    <th width="10%">商品规格</th>
                    <th width="20%">商品数量</th>
                    <th width="20%">商品单价</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach($order['goods_list'] as $k=>$v):?>
                <tr>
                    <td>{$v.goods_name}</td>
                    <td><?php echo showImage($v[sm_logo]);?></td>
                    <td>
                        <?php foreach($v['gaData'] as $k1 => $v1):?>
                        <p>{$v1.attr_name}</p>:{$v1.attr_value}
                        <?php endforeach;?>
                    </td>
                    <td>{$v.goods_number}</td>
                    <td>{$v.price}</td>
                </tr>
                <?php endforeach;?>
                </tbody>
            </table>
            <br/>
            <table class="order">
                <tbody>
                <tr>
                    <td colspan="<?php if($order['post_status']==1):?>5<?php else:?>6<?php endif?>">
                        <span>收货人：{$order.shr_name},</span>
                        <span style="margin-left:20px">收货电话：{$order.shr_tel},</span>
                        <span style="margin-left:20px">收货地址：{$order.shr_province} {$order.shr_city} {$order.shr_area} {$order.shr_address}
                        </span>
                        <span style="margin-left:20px">快递单号：{$order.post_number}</span>
                    </td>
                    <?php if($order['post_status'] ==1 ):?>
                    <td>
                        <p class="alipaysubmit">
                            <a href="<?php echo U('My/setReceived',array('id'=>$order['id']))?>"
                            onclick="if(confirm('您确定收获吗')){return ture;}else{return false;}">
                                确认收货
                                </a>
                        </p>
                    </td>
                    <?php endif?>
                </tr>
                <tr>
                    <td colspan="4">
                        订单总价:<span style="font_size:20px; color: red">￥{$order.total_price}</span>,
                        下单时间:<?php echo date('Y-m-d H:i:s',$order['addtime']);?>
                        </td>
                    <td width="10%">
                    <?php if($order['order_status'] == '正常'):?>
                    <?php if($order['pay_status'] == '否'):?>
                    <?php echo $order['post_status'] ==1 ? '已发货' : ($order['post_status'] ==2) ? '已签收' :'未发货'?>
                    <?php else:?>
                    <p class="alipaysubmit"><?php echo makeAlipayBtn($order['id']);?></p>
                    <?php endif;?>
                    <?php else:?>
                    已取消
                    <?php endif;?>
                    </td>
                    <td width="5%"><a href="{:U('My/order')}">返回</a></td>
                </tr>
                </tbody>
                </table>
        </div>
    </div>
    <!-- 右侧内容区域 end -->
</div>
<!-- 页面主体 end-->
<include file="Common/help"/>
